import requests


class Capsolver():
    url = "https://api.capsolver.com"
    client_key = "CAP-32DDDA67605199A0B127D5D6F2526B0A"

    def __init__(self):
        pass

    def create_task(self, game_variant, image):
        res = requests.post(self.url + "/createTask", json={
            "clientKey": self.client_key,
            "task": {
                "type": "FunCaptchaClassification",
                "image": image,
                "question": game_variant
            }
        })
        return res.json()